<?php
#订单
session_start();
if(!isset($_SESSION['totalPrice'])){
    echo "<script>location.href='index.php';</script>";
}else{
    $totalPrice = $_SESSION['totalPrice'];
}
?>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>创建订单</title>
    <link rel="stylesheet" href="css/order.css">
  </head>
  <body>
    <div class="order">
      <div class="left">
        <img src="./img/payment.png" alt="vx:15575386861" />
        <h1>V我<?php echo $totalPrice;?></h1>
      </div>
      <div class="right">
        <form action="addOrder.php" method="post">
          <h2>填写收货人信息</h2>
          <label for="gname">收货人姓名：</label>
          <input type="text" id="gname" name="gname"><br>

          <label for="sex">收货人性别：</label>
          <input type="radio" name="sex" value="男" checked>男
          <input type="radio" name="sex" value="女">女<br>

          <label for="address">收货地址：</label>
          <input type="text" id="address" name="address"><br>

          <label for="code">邮政编码：</label>
          <input type="text" id="code" name="code"><br>

          <label for="email">邮箱地址：</label>
          <input type="text" id="email" name="email"><br>

          <label for="tel">联系电话：</label>
          <input type="text" id="tel" name="tel"><br>
          
          <label for="method">送货方式：</label>
          <select name="method">
            <option value="普通快递">普通快递</option>
            <option value="加急快递">加急快递</option>
            <option value="特快专递">特快专递</option>
          </select><br>

          <input type="submit" value="提交">
          <input type="reset" value="重置">
        </form>
      </div>
    </div>
  </body>
</html>
